<p class="entity-table">
    <?= $this->Html->link("&laquo; nazad", "/clients", array( 'escape' => false ))?>
    
    <span class="actions visible form button-set">
    <? if (!empty($data['Client']['id'])): ?>
    <? $entityId = $data['Client']['id'] ?>
    
        <?= $this->Form->button('Kreiraj kampanju', array(
            'type'    => 'button',
            'onclick' => "location.href='/campaigns/create/?client={$entityId}'"
        )) ?><?= $this->Form->button('Obriši', array(
            'class'   => 'delete',
            'onclick' => "if (confirm('Da li želite da obrišete klijenta?')){location.href = '/clients/remove/{$entityId}'}"
        ))?>
    <? endif ?>
    </span>
</p>
<?= $this->Form->create('Client', array('url' => '/clients/save')) ?>

    <?= $this->Form->hidden('id', array( 'value' => (int)@$data['Client']['id'])) ?>

    <p><?= $this->Form->label('name', 'Naziv:') ?>
    <?= $this->Form->text('name', array( 'value' => @$data['Client']['name'], 'class'=>'large')) ?>
    <?= $this->App->formError('name') ?></p>

    <p><?= $this->Form->label('address', 'Adresa:') ?>
    <?= $this->Form->text('address', array( 'value' => @$data['Client']['address'], 'class'=>'large')) ?></p>
    
    <p><?= $this->Form->label('zipcode', 'Poštanski broj:') ?>
    <?= $this->Form->text('zipcode', array( 'value' => @$data['Client']['zipcode'], 'class'=>'small')) ?>
    <?= $this->Form->label('city', 'Grad:') ?>
    <?= $this->Form->text('city', array( 'value' => @$data['Client']['city'])) ?></p>
    
    <p><?= $this->Form->label('pib', 'PIB:') ?>
    <?= $this->Form->text('pib', array( 'value' => @$data['Client']['pib'], 'class'=>'small')) ?>
    <?= $this->Form->label('matbr', 'Mat.BR:', array('class'=>'inline')) ?>
    <?= $this->Form->text('matbr', array( 'value' => @$data['Client']['matbr'], 'class'=>'small')) ?></p>
    
    <p><?= $this->Form->label('contact_person', 'Kontakt osoba:') ?>
    <?= $this->Form->text('contact_person', array( 'value' => @$data['Client']['contact_person'], 'class'=>'large')) ?></p>
    
    <p><?= $this->Form->label('phone', 'Telefon:') ?>
    <?= $this->Form->text('phone', array( 'value' => @$data['Client']['phone'], 'class'=>'medium' )) ?>
    <?= $this->Form->label('fax', 'Faks:', array('class'=>'auto')) ?>
    <?= $this->Form->text('fax', array( 'value' => @$data['Client']['fax'], 'class'=>'medium' )) ?></p>
    
    <p><?= $this->Form->label('email', 'E-Mail:') ?>
    <?= $this->Form->text('email', array( 'value' => @$data['Client']['email'] )) ?></p>
    
    <p><?= $this->Form->label('comment', 'Napomena:', array('class'=>'left')) ?>
    <?= $this->Form->textarea('comment', array( 'value' => @$data['Client']['comment'] )) ?></p>
    
    <p><?= $this->Form->label('start_due', 'Početni dug:') ?>
    <?= $this->Form->text('start_due', array( 'value' => @$data['Client']['start_due'], 'class' => 'price' )) ?></p>
    
    <?= $this->Form->button('Sačuvaj') ?>
<?= $this->Form->end() ?>
